﻿<Window x:Class="Intex.Controls.Stopwatch.StopwatchControlConfigDialog"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:Intex.Controls"
        mc:Ignorable="d" 
        Title="码表配置" Height="306" Width="410" WindowStartupLocation="CenterOwner" ShowInTaskbar="False" >
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="30"/>
        </Grid.RowDefinitions>
        <Grid Grid.Row="0" Margin="10">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="80"/>
                <ColumnDefinition Width="5"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="26"/>
                <RowDefinition Height="26"/>
                <RowDefinition Height="26"/>
                <RowDefinition Height="26"/>
                <RowDefinition Height="26"/>
                <RowDefinition Height="26"/>
                <RowDefinition Height="26"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <TextBlock Text="码表型号" Grid.Row="0" Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Center"/>
            <TextBlock Text="串口名称" Grid.Row="1" Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Center"/>
            <TextBlock Text="比特率" Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Center"/>
            <TextBlock Text="数据位" Grid.Row="3" Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Center"/>
            <TextBlock Text="奇偶较验" Grid.Row="4" Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Center"/>
            <TextBlock Text="停止位" Grid.Row="5" Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Center"/>
            <TextBlock Text="流控制" Grid.Row="6" Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Center"/>

            <ComboBox SelectedValue="{Binding StopwatchType}" Name="cbxStopwatchType" Grid.Row="0" Grid.Column="2" Margin="2" />
            <ComboBox SelectedValue="{Binding PortName}" Name="cbxPortName" Grid.Row="1" Grid.Column="2" Margin="2" />
            <TextBox Text="{Binding BaudRate}" Name="txtBaudRate" Grid.Row="2" Grid.Column="2" Margin="2" />
            <TextBox Text="{Binding DataBits}" Name="txtDataBits" Grid.Row="3" Grid.Column="2" Margin="2"/>
            <ComboBox SelectedValue="{Binding Parity}" Name="cbxParity" Grid.Row="4" Grid.Column="2" Margin="2"/>
            <ComboBox SelectedValue="{Binding StopBits}" Name="cbxStopBit" Grid.Row="5" Grid.Column="2" Margin="2" />
            <ComboBox SelectedValue="{Binding Handshake}" Name="cbxHandshake" Grid.Row="6" Grid.Column="2" Margin="2" />
        </Grid>
        <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,3,10,3">
            <Button Name="btnOk" Content="OK" Width="80" Click="btnOk_Click"/>
            <TextBlock Width="5"></TextBlock>
            <Button Name="btnCancel" Content="Cancel" Width="80" Click="btnCancel_Click"/>
        </StackPanel>
    </Grid>
</Window>
